//Sprite for DirectX game

#ifndef SPRITE_H
#define SPRITE_H

#include <d3dx9.h>
#include "game.h"

using namespace game;

class DXSprite : public Sprite
{	
  public:
    DXSprite();
    DXSprite(const char*, D3DCOLOR, int, int);
    virtual int GetNumberSprite();
    virtual float GetWidth();
    virtual float GetHeight();
    virtual float GetCoordinate_X();
    virtual float GetCoordinate_Y();
    virtual void SetPosition(float, float);
    virtual void Draw(int = 0, float = 1.0f, int = 255, float = 0.0f, float = 0.0f, float = 0.0f); 				 
    virtual ~DXSprite();
		
  private:
    ID3DXSprite* pSprite;                   //Pointer to interface DirectX sprite
    IDirect3DTexture9* pTexture;            //Pointer to interface DirectX texture
    int numberRow;                          //Number of row for image 
    int spritePerRow;			            //Number of sprite per row
    D3DXIMAGE_INFO infoImg;	                //Infomation of image
    D3DXVECTOR2 position;                   //Coordinate of this sprite
};

#endif